package com.dianning.service.imp;

import java.io.IOException;
import java.io.InputStream;
import java.util.*;

import org.apache.commons.logging.*;

import com.dianning.bean.AdSpace;
import com.dianning.bean.Reserve;
import com.dianning.bean.Visitor;
import com.dianning.dao.AdAdsDAO;
import com.dianning.dao.AdSpaceDAO;
import com.dianning.dao.ReserveDAO;
import com.dianning.dao.VisitorDAO;
import com.dianning.exception.DianningException;
import com.dianning.service.AdService;
import com.dianning.service.ReserveService;
import com.dianning.service.VisitorService;

public class ReserveServiceImp implements ReserveService {

	private static final Log logger = LogFactory.getLog(ReserveServiceImp.class);
	
	private ReserveDAO reserveDAO;

	public ReserveDAO getReserveDAO() {
		return reserveDAO;
	}

	public void setReserveDAO(ReserveDAO reserveDAO) {
		this.reserveDAO = reserveDAO;
	}	

	/**
	 * 保存Recerve对象
	 * 
	 * @param recerve
	 * 			Recerve对象
	 * @return Recerve
	 * 			Recerve对象
	 */
	public Reserve saveReserve(Reserve reserve){
		return this.getReserveDAO().saveReserve(reserve);
	}
	
	/**
	 * 获取Recerve个数
	 * 
	 * @return int
	 * 			Recerve个数
	 */
	public long getReserveNum(long infoId,int status){
		return this.getReserveDAO().getReserveNum(infoId, status);
	}
	/**
	 * 获取Recerve列表
	 * 
	 * @param orderby
	 *            String
	 * @param ascOrDesc
	 *            int
	 * @return List
	 * 			Recerve对象列表
	 */
	public List findReserves(long infoId,int status,String orderby, int ascOrDesc){
		//return this.getReserveDAO().findReserves(infoId, status, orderby, ascOrDesc);
		return null;
	}
	
	/**
	 * 获取Recerve列表
	 * 
	 * @param orderby
	 *            String
	 * @param ascOrDesc
	 *            int
	 * @return List
	 * 			Recerve对象列表
	 */
	public List findReserves(long infoId,String type,int status,String orderby, int ascOrDesc){
		return this.getReserveDAO().findReserves(infoId, type, status, orderby, ascOrDesc);
	}

}
